$(()=>{
  let echart = echarts.init(document.getElementById('echart'));
  
  var option ={
    title:{
      text:'JavaScript语言排行变化'
    },
    tooltip:{
      trigger:'axis',
      axisPointer:{
        type:'line'
      }
    },
    legend:{
    },
    yAxis:{
    },
    series:[{
      name:'排名',
      type:'line',
      data:[6,9,8,8,7],
    }],
    xAxis:{
      data:[2000,2005,2010,2015,2020]
    }
  }
  echart.setOption(option);
  var e = $('.excl');
  return new Handsontable(e.get(0),{
    data:[
      ["Java","1","降","-0.01%"],
      ["C","2","升","+2.44%"],
      ["Python","3","升","+1.41%"],
      ["C++","4","降","-2.58%"],
      ["Visual Basic.NET","6","降","-1.71%"],
      ["JavaScript","7","降","-0.85%"],
    ],
    contextMenu:true,
    manualRowResize:false,
    manualColumnResize:false,
    rowHeaders:false,
    colHeaders:["语言名称","排名","升或降","变化幅度"],
    className:'htCenter htMiddle',
    colWidths:150,
    rowHeights:50,
  })
});
